package com.chapter01exercise.homework10;

import javax.print.Doc;

/**
 * @Author 小闽
 * @Date 2024/8/17 16:23
 * @PackageName: com.chapter01exercise.homework10
 * @ClassName: Homework10
 * @Description: 练习10
 * @Version 1.0
 */
public class Homework10 {
    /**
     * 编写Doctor类{name,age,job,gender,sal}相应的getter()和setter()方法，5个参数的构造器，
     * 重写父类的equals()方法：public boolean equals(Object obj),并判断测试类中创建的两个对象
     * 是否相等。相等就是判断属性是否相同。
     */
    public static void main(String[] args) {
        Doctor doctor1 = new Doctor("陈启明", 20, "实施工程师",'男', 30000);
        Doctor doctor2 = new Doctor("黄芸芸", 20, "实施工程师",'男', 30000);
        System.out.println(doctor1.equals(doctor2));
    }
}
